package com.weimob.mcloud.wechatwork.customer.domain.enums;

import lombok.Getter;

@Getter
public enum WechatWorkChannelDescEnum {
    UN_KNOW_CHANNEL(-1,""),
    WECHATWORK_CHANNEL(0, ""),
    MICRO_MALL_CHANNEL(1, "微商城");

    private final Integer code;
    private final String desc;

    WechatWorkChannelDescEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static WechatWorkChannelDescEnum getEnumByValue(int code) {
        WechatWorkChannelDescEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            WechatWorkChannelDescEnum typeEnum = var1[var3];
            if (code == typeEnum.code) {
                return typeEnum;
            }
        }
        return WechatWorkChannelDescEnum.UN_KNOW_CHANNEL;
    }
}
